<template>
	<view class="x-wrapper">
		<view class="x-main-content">
			<view class="detail-box">
				<image src="http://www.peiyiyiliao.com/QRCodeShare/imgs/bg.png" mode="" class="bg"></image>
				<view class="content-box">
					<u-navbar bgColor="transparent" :fixed="true" leftIconColor="#333" leftIconSize="42rpx" autoBack
						placeholder>
					</u-navbar>
					<view class="nr-box">
						<image class="touxiang" :src="companionList.img" mode=""></image>
						<text class="name">{{companionList.name}}</text>
					</view>
					<view class="aaa">
						<view class="bbb">
							<text class="score">{{companionList.score + '%'}}</text>
							<text class="score1">好评率</text>
						</view>
						<view class="bbb">
							<text class="score">{{companionList.peizhengNo}}</text>
							<text class="score1">陪诊数</text>
						</view>
						<view class="bbb">
							<text class="score">{{companionList.workTime}}</text>
							<text class="score1">从业(年)</text>
						</view>
					</view>
					<view class="introduction">
						<span
							style="display: inline-block;height: 20rpx;border-bottom: 20rpx solid  #9bb7ff ;color: #333;font-weight: 600;">简介</span>
						<u-read-more :toggle="true" showHeight="300">
							<rich-text class="nr-jianjie" :nodes="companionList.introduction"></rich-text>
						</u-read-more>
					</view>
				</view>
			</view>
		</view>
		<!-- 		<view class="toBook" @click="goBook">
			立即预约
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				companionList: {}
			}
		},
		onLoad(e) {
			this.companionList = JSON.parse(decodeURIComponent(e.data))
		},
		methods: {
			// goBook() {
			// 	uni.navigateTo({
			// 		url: '/pages/companion/companion-order',
			// 	})
			// }
		}
	}
</script>

<style lang="scss" scoped>
	.detail-box {
		position: relative;

		.bg {
			position: absolute;
			height: 100vh;
			width: 100%;
			top: 0;
			left: 0;
			z-index: 1;
		}

		.content-box {
			position: relative;
			z-index: 2;
		}

		.nr-box {
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;

			.touxiang {
				width: 128rpx;
				height: 128rpx;
			}

			.name {
				margin-top: 10rpx;
				font-size: 36rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				color: #20202A;
				letter-spacing: 1px;
			}
		}

		.aaa {
			display: flex;
			justify-content: space-around;
			align-items: center;
			margin-top: 30rpx;
		}

		.bbb {
			display: flex;
			flex-direction: column;
			align-items: center;
		}

		.score {
			font-size: 37rpx;
			font-family: HelveticaNeue, HelveticaNeue;
			font-weight: 500;
			color: #20202A;
			letter-spacing: 1px;
		}

		.score1 {
			font-size: 24rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			color: #20202A;
			letter-spacing: 1px;
			margin-top: 10rpx;
		}
	}

	.introduction {
		background: #fff;
		padding: 30rpx;
		margin: 30rpx;
		border-radius: 16rpx;

		.jianjie {
			width: 65rpx;
			height: 43rpx;
		}

		.nr-jianjie {
			font-size: 24rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			color: #6F7DA2;
			line-height: 40rpx;
			letter-spacing: 1px;
		}
	}

	.toBook {
		position: fixed;
		height: 110rpx;
		background-color: #3F67F6;
		width: 100%;
		bottom: 0;
		z-index: 999;
		text-align: center;
		line-height: 96rpx;
		color: #fff;
		font-size: 40rpx;
		letter-spacing: 3px;
	}
</style>